*********************************************************************************************************************
****Code to Replicate Data Analysis in,******************************************************************************
****Who Votes for Populist Presidential Candidates? Differential Support among US-based Latin American Diasporas"****
****Konstantin Ash and Anca Turcu, forthcoming in Political Geography************************************************
*********************************************************************************************************************

***Clean up Cross-Country ACS Results Data***
#delimit;
use populist_cross_country;
***Table 2: Ordinary Least Squares Regression on Relative Support for 1st Round Presidential Candidates***;
***among diasporas in the United States compared to origin country voters***;
egen election_year= concat(country year);
xi: reg  base2logprop gps_plur_pop_4point incumbency right conservative i.election_year ,vce(cluster country);
eststo a1;
xi: reg  base2logprop gps_pop_bin incumbency  right conservative  i.election_year  ,vce(cluster country);
eststo a2;
xi: reg  base2logprop  gpswillpeople gps_peopledecide gps_corrupt gps_strongman incumbency  right conservative  i.election_year ,vce(cluster country);
eststo a3;
xi: reg  base2logprop right left_populist right_populist incumbency  conservative i.election_year ,vce(cluster country);
eststo a4;
xi: reg  base2logprop gps_pop_bin post_trump populist_post_trump  incumbency right conservative i.election_year ,vce(cluster country);
eststo a5;
xi: reg  base2logprop gps_pop_bin  incumbency populist_incumbent right conservative  i.election_year ,vce(cluster country);
eststo a6;
estout a1 a2 a3 a4 a5 a6 using crosscountry.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

***Table 3: Ordinary Least Squares Regression on Sub-samples of Relative Support for 1st Round***;
***Presidential Candidates among diasporas in the United States compared to origin country voters***;

reg  base2logprop  incumbency right conservative  age_arrival female education log2_income unemployed socialization race_id_white english_prof  if gps_pop_bin==0,vce(cluster country);
eststo f1;
reg  base2logprop  incumbency right conservative  age_arrival female education log2_income unemployed socialization race_id_white english_prof if gps_pop_bin==1,vce(cluster country);
eststo f2;
reg  base2logprop  incumbency  gps_plur_pop_4point conservative  age_arrival female education log2_income unemployed socialization race_id_white english_prof if right==0,vce(cluster country);
eststo f3;
reg  base2logprop  incumbency  gps_plur_pop_4point conservative  age_arrival female education log2_income unemployed socialization race_id_white english_prof if right==1,vce(cluster country);
eststo f4;
estout f1 f2 f3 f4  using crosscountry2.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

save populist_cross_country,replace;
clear;

use sub_national;
***Table 4: Ordinary Least Squares Regression on Relative Support for 1st Round Presidential Candidates***;
***within consulate jurisdictions among diasporas in the United States compared to origin***;
***country voters***;
xi:reg  base2logprop gps_plur_pop_4point right conservative incumbency age_arrival female education log2_income unemployed veteran socialization race_id_white english_prof numberofrespondents i.election_year,vce(cluster consulate);
eststo b1;
xi:reg  base2logprop gps_pop_bin right conservative incumbency  age_arrival female education log2_income unemployed veteran socialization race_id_white english_prof numberofrespondents i.election_year,vce(cluster consulate);
eststo b2;
xi:reg  base2logprop  gpswillpeople gps_peopledecide gps_corrupt gps_strongman right conservative incumbency  age_arrival female education log2_income unemployed veteran socialization race_id_white english_prof numberofrespondents i.election_year,vce(cluster consulate);
eststo b3;
xi:reg  base2logprop right gps_pop_bin right_populist conservative incumbency  age_arrival female education log2_income unemployed veteran socialization race_id_white english_prof numberofrespondents i.election_year,vce(cluster consulate);
eststo b4;
xi:reg  base2logprop gps_pop_bin populist_incumbent  right conservative incumbency  age_arrival female education log2_income unemployed veteran socialization race_id_white english_prof numberofrespondents i.election_year,vce(cluster consulate);
eststo b5;
estout b1 b2 b3 b4 b5 using subnat1.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

***Table 5: Ordinary Least Squares Regression on Sub-samples of Relative Support for 1st Round***;
***Presidential Candidates within consulate jurisdictions among diasporas in the United States compared***;
***to origin country voters***;
xi: reg  base2logprop right conservative incumbency  age_arrival female education log2_income unemployed veteran socialization race_id_white english_prof numberofrespondents i.election_year if gps_pop_bin==0,vce(cluster consulate);
eststo c1;
xi: reg  base2logprop right conservative incumbency  age_arrival female education log2_income unemployed veteran socialization race_id_white english_prof numberofrespondents i.election_year if gps_pop_bin==1,vce(cluster consulate);
eststo c2;
xi: reg  base2logprop gps_plur_pop_4point conservative incumbency  age_arrival female education log2_income unemployed veteran socialization race_id_white english_prof numberofrespondents i.election_year if right==0,vce(cluster consulate);
eststo c3;
xi: reg  base2logprop gps_plur_pop_4point conservative incumbency  age_arrival female education log2_income unemployed veteran socialization race_id_white english_prof numberofrespondents i.election_year if right==1,vce(cluster consulate);
eststo c4;
estout c1 c2 c3 c4  using subnat2.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

save sub_national,replace;
clear;
 use populist_cross_country;


***Table 6: Ordinary Least Squares Regression on Relative Support for 1st Round Presidential Candidates***;
***within consulate jurisdictions among diasporas in the United States compared to origin***;
***country voters***;
xi: reg  base2logprop gps_plur_pop_4point incumbency right conservative i.election_year if sub_national_missing_country==1,vce(cluster country);
eststo v1;
xi: reg  base2logprop gps_pop_bin incumbency  right conservative i.election_year  if sub_national_missing_country==1,vce(cluster country);
eststo v2;
xi: reg  base2logprop  gpswillpeople gps_peopledecide gps_corrupt gps_strongman incumbency  right conservative i.election_year if sub_national_missing_country==1,vce(cluster country);
eststo v3;
xi: reg  base2logprop right left_populist right_populist incumbency  conservative i.election_year if sub_national_missing_country==1 ,vce(cluster country);
eststo v4;
xi: reg  base2logprop gps_pop_bin post_trump populist_post_trump  incumbency right conservative i.election_year if sub_national_missing_country==1 ,vce(cluster country);
eststo v5;
xi: reg  base2logprop gps_pop_bin incumbency populist_incumbent right conservative i.election_year if sub_national_missing_country==1 ,vce(cluster country);
eststo v6;
estout v1 v2 v3 v4 v5 v6 using crosscountry5.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 


***Table 7: Ordinary Least Squares Regression on Relative Support for 1st Round Presidential Candidates***;
***within consulate jurisdictions among diasporas in the United States compared to origin***;
***country voters***;
xi: reg  base2logprop gps_plur_pop_4point incumbency right conservative i.election_year if sub_national_missing_country!=1,vce(cluster country);
eststo w1;
xi: reg  base2logprop gps_pop_bin incumbency  right conservative i.election_year  if sub_national_missing_country!=1,vce(cluster country);
eststo w2;
xi: reg  base2logprop  gpswillpeople gps_peopledecide gps_corrupt gps_strongman incumbency  right conservative i.election_year if sub_national_missing_country!=1,vce(cluster country);
eststo w3;
xi: reg  base2logprop right left_populist right_populist incumbency  conservative i.election_year if sub_national_missing_country!=1 ,vce(cluster country);
eststo w4;
xi: reg  base2logprop gps_pop_bin post_trump populist_post_trump  incumbency right conservative i.election_year if sub_national_missing_country!=1 ,vce(cluster country);
eststo w5;
xi: reg  base2logprop gps_pop_bin incumbency populist_incumbent right conservative i.election_year if sub_national_missing_country!=1 ,vce(cluster country);
eststo w6;
estout w1 w2 w3 w4 w5 w6 using crosscountry6.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 




***************************************
*******APPENDIX************************
***************************************
clear;
use sub_national_appendix;

***Table A72: Ordinary Least Squares Regression on Relative Support for 1st Round Presidential***;
***Candidates within consulate jurisdictions among diasporas in the United States compared to origin***;
***country voters including Dominican Republic and Honduras***;
xi:reg  base2logprop gps_plur_pop_4point right conservative incumbency   age_arrival female education log2_income unemployed veteran socialization race_id_white english_prof numberofrespondents i.election_year,vce(cluster consulate);
eststo g1;
xi:reg  base2logprop gps_pop_bin right conservative incumbency   age_arrival female education log2_income unemployed veteran socialization race_id_white english_prof numberofrespondents i.election_year,vce(cluster consulate);
eststo g2;
xi:reg  base2logprop  gpswillpeople gps_peopledecide gps_corrupt gps_strongman right conservative incumbency   age_arrival female education log2_income unemployed veteran socialization race_id_white english_prof  numberofrespondents i.election_year,vce(cluster consulate);
eststo g3;
xi:reg  base2logprop right gps_pop_bin right_populist conservative incumbency   age_arrival female education log2_income unemployed veteran socialization race_id_white english_prof  numberofrespondents i.election_year,vce(cluster consulate);
eststo g4;
xi:reg  base2logprop gps_pop_bin populist_incumbent  right conservative incumbency  age_arrival female education log2_income unemployed veteran socialization race_id_white english_prof numberofrespondents i.election_year,vce(cluster consulate);
eststo g5;
estout g1 g2 g3 g4 g5 using subnat3.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

***Table A73: Ordinary Least Squares Regression on Sub-samples of Relative Support for 1st Round***;
***Presidential Candidates within consulate jurisdictions among diasporas in the United States compared***;
***to origin country voters including Dominican Republic and Honduras***;
xi: reg  base2logprop right conservative incumbency   age_arrival female education log2_income unemployed veteran socialization race_id_white english_prof  numberofrespondents i.election_year if gps_pop_bin==0,vce(cluster consulate);
eststo h1;
xi: reg  base2logprop right conservative incumbency   age_arrival female education log2_income unemployed veteran socialization race_id_white english_prof  numberofrespondents i.election_year if gps_pop_bin==1,vce(cluster consulate);
eststo h2;
xi: reg  base2logprop gps_plur_pop_4point conservative incumbency   age_arrival female education log2_income unemployed veteran socialization race_id_white english_prof  numberofrespondents i.election_year if right==0,vce(cluster consulate);
eststo h3;
xi: reg  base2logprop gps_plur_pop_4point conservative incumbency   age_arrival female education log2_income unemployed veteran socialization race_id_white english_prof  numberofrespondents i.election_year if right==1,vce(cluster consulate);
eststo h4;
estout h1 h2 h3 h4  using subnat4.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 



save sub_national_appendix,replace;
clear;
use sub_national_missing;

***Table A74: Logistic Regression on where consulate-level data is missing***;
logit sub_national_missing  age_arrival female education log2_income unemployed socialization race_id_white english_prof,vce(cluster country);
eststo s1;
logit  sub_national_missing_country age_arrival female education log2_income unemployed socialization race_id_white english_prof ,vce(cluster country);
eststo s2;
estout s1 s2  using missing.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 
clear;
 use populist_cross_country;

***Table A75: Ordinary Least Squares Regression on Relative Support for 1st Round Presidential***;
***Candidates among diasporas in the United States compared to origin country voters***;



xi: reg  base2logprop gps_plur_pop_4point incumbency right conservative i.election_year if sub_national_missing==1,vce(cluster country);
eststo y1;
xi: reg  base2logprop gps_pop_bin incumbency  right conservative i.election_year  if sub_national_missing==1,vce(cluster country);
eststo y2;
xi: reg  base2logprop  gpswillpeople gps_peopledecide gps_corrupt gps_strongman incumbency  right conservative i.election_year if sub_national_missing==1,vce(cluster country);
eststo y3;
xi: reg  base2logprop right left_populist right_populist incumbency  conservative i.election_year if sub_national_missing==1 ,vce(cluster country);
eststo y4;
xi: reg  base2logprop gps_pop_bin post_trump populist_post_trump  incumbency right conservative i.election_year if sub_national_missing==1 ,vce(cluster country);
eststo y5;
xi: reg  base2logprop gps_pop_bin incumbency populist_incumbent right conservative i.election_year if sub_national_missing==1 ,vce(cluster country);
eststo y6;
estout y1 y2 y3 y4 y5 y6 using crosscountry3.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 


***Table A76: Ordinary Least Squares Regression on Relative Support for 1st Round Presidential***;
***Candidates within consulate jurisdictions among diasporas in the United States compared to origin***;
***country voters***;
xi: reg  base2logprop gps_plur_pop_4point incumbency right conservative i.election_year if sub_national_missing!=1,vce(cluster country);
eststo x1;
xi: reg  base2logprop gps_pop_bin incumbency  right conservative  i.election_year if sub_national_missing!=1,vce(cluster country);
eststo x2;
xi: reg  base2logprop  gpswillpeople gps_peopledecide gps_corrupt gps_strongman incumbency  right conservative i.election_year if sub_national_missing!=1,vce(cluster country);
eststo x3;
xi: reg  base2logprop right left_populist right_populist incumbency  conservative i.election_year  if sub_national_missing!=1 ,vce(cluster country);
eststo x4;
xi: reg  base2logprop gps_pop_bin post_trump populist_post_trump  incumbency right conservative i.election_year if sub_national_missing!=1 ,vce(cluster country);
eststo x5;
xi: reg  base2logprop gps_pop_bin incumbency populist_incumbent right conservative i.election_year if sub_national_missing!=1 ,vce(cluster country);
eststo x6;
estout x1 x2 x3 x4 x5 x6 using crosscountry4.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 







***Table A77: Ordinary Least Squares Regression on Sub-samples of Relative Support for 1st Round***;
***Presidential Candidates among diasporas in the United States compared to origin country voters***;
reg  base2logprop  incumbency right conservative  age_arrival female education log2_income unemployed socialization education_socialization race_id_white english_prof  if gps_pop_bin==0,vce(cluster country);
eststo g1;
reg  base2logprop  incumbency right conservative  age_arrival female education log2_income unemployed socialization education_socialization race_id_white english_prof if gps_pop_bin==1,vce(cluster country);
eststo g2;
reg  base2logprop  incumbency  gps_plur_pop_4point conservative  age_arrival female education log2_income unemployed socialization education_socialization race_id_white english_prof if right==0,vce(cluster country);
eststo g3;
reg  base2logprop  incumbency  gps_plur_pop_4point conservative  age_arrival female education log2_income unemployed socialization education_socialization race_id_white english_prof if right==1,vce(cluster country);
eststo g4;
estout g1 g2 g3 g4  using crosscountry2a.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 


***Table A79: Ordinary Least Squares Regression on Sub-samples of Relative Support for 1st Round***;
***Presidential Candidates among diasporas in the United States compared to origin country voters***;
reg  base2logprop  incumbency right conservative  age_arrival female education log2_income unemployed post_trump socialization posttrump_socialization race_id_white english_prof  if gps_pop_bin==0,vce(cluster country);
eststo h1;
reg  base2logprop  incumbency right conservative  age_arrival female education log2_income unemployed post_trump socialization posttrump_socialization race_id_white english_prof if gps_pop_bin==1,vce(cluster country);
eststo h2;
reg  base2logprop  incumbency  gps_plur_pop_4point conservative  age_arrival female education log2_income unemployed post_trump socialization posttrump_socialization race_id_white english_prof if right==0,vce(cluster country);
eststo h3;
reg  base2logprop  incumbency  gps_plur_pop_4point conservative  age_arrival female education log2_income unemployed post_trump socialization posttrump_socialization race_id_white english_prof if right==1,vce(cluster country);
eststo h4;
estout h1 h2 h3 h4  using crosscountry2b.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 


***Table A80: Ordinary Least Squares Regression on Sub-samples of Relative Support for 1st Round***;
***Presidential Candidates among diasporas in the United States compared to origin country voters***;
reg  base2logprop  incumbency right conservative  age_arrival female education log2_income unemployed socialization age_arrival_socialization race_id_white english_prof  if gps_pop_bin==0,vce(cluster country);
eststo k1;
reg  base2logprop  incumbency right conservative  age_arrival female education log2_income unemployed socialization age_arrival_socialization race_id_white english_prof if gps_pop_bin==1,vce(cluster country);
eststo k2;
reg  base2logprop  incumbency  gps_plur_pop_4point conservative  age_arrival female education log2_income unemployed socialization age_arrival_socialization race_id_white english_prof if right==0,vce(cluster country);
eststo k3;
reg  base2logprop  incumbency  gps_plur_pop_4point conservative  age_arrival female education log2_income unemployed socialization age_arrival_socialization race_id_white english_prof if right==1,vce(cluster country);
eststo k4;
estout k1 k2 k3 k4  using crosscountry2c.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 
clear;
use sub_national;



***Table A78: Ordinary Least Squares Regression on Sub-samples of Relative Support for 1st Round***;
***Presidential Candidates among diasporas in the United States compared to origin country voters at***;
***consulate district level***;
xi: reg  base2logprop right conservative incumbency  age_arrival female education log2_income unemployed veteran socialization education_socialization race_id_white english_prof numberofrespondents i.election_year if gps_pop_bin==0,vce(cluster consulate);
eststo i1;
xi: reg  base2logprop right conservative incumbency  age_arrival female education log2_income unemployed veteran socialization education_socialization race_id_white english_prof numberofrespondents i.election_year if gps_pop_bin==1,vce(cluster consulate);
eststo i2;
xi: reg  base2logprop gps_plur_pop_4point conservative incumbency  age_arrival female education log2_income unemployed veteran  socialization education_socialization  race_id_white english_prof numberofrespondents i.election_year if right==0,vce(cluster consulate);
eststo i3;
xi: reg  base2logprop gps_plur_pop_4point conservative incumbency  age_arrival female education log2_income unemployed veteran socialization education_socialization  race_id_white english_prof numberofrespondents i.election_year if right==1,vce(cluster consulate);
eststo i4;
estout i1 i2 i3 i4  using subnat2a.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

***Table A81: Ordinary Least Squares Regression on Sub-samples of Relative Support for 1st Round***;
***Presidential Candidates among diaspora voters in the United States compared to origin country***;
***voters at consulate district level***;
xi: reg  base2logprop right conservative incumbency  age_arrival female education log2_income unemployed veteran socialization age_arrival_socialization race_id_white english_prof numberofrespondents i.election_year if gps_pop_bin==0,vce(cluster consulate);
eststo j1;
xi: reg  base2logprop right conservative incumbency  age_arrival female education log2_income unemployed veteran socialization age_arrival_socialization race_id_white english_prof numberofrespondents i.election_year if gps_pop_bin==1,vce(cluster consulate);
eststo j2;
xi: reg  base2logprop gps_plur_pop_4point conservative incumbency  age_arrival female education log2_income unemployed veteran socialization age_arrival_socialization race_id_white english_prof numberofrespondents i.election_year if right==0,vce(cluster consulate);
eststo j3;
xi: reg  base2logprop gps_plur_pop_4point conservative incumbency  age_arrival female education log2_income unemployed veteran socialization age_arrival_socialization race_id_white english_prof numberofrespondents i.election_year if right==1,vce(cluster consulate);
eststo j4;
estout j1 j2 j3 j4  using subnat2c.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 


clear;
use populist_cross_diaspora;
***Table A82: Difference in Vote Share for 1st Round Presidential Election Candidates in Bolivia,***;
***Chile, Ecuador, Paraguay, and Peru between destination country and origin country***;
tab   dest_country  gps_pop_bin,sum( base2logprop);
tab   dest_country right,sum( base2logprop);

tab  right conservative  if  dest_country=="United States" &  usdiasporashare!=.;
tab  right gps_pop_bin  if  dest_country=="United States" &  usdiasporashare!=.;

***Table A83: Ordinary Least Squares Regression on Relative Support for 1st Round Presidential***;
***Candidates among diasporas compared to origin country voters including non-US destination***;
***country voters in Bolivia, Chile, Ecuador, Paraguay, and Peru***;
xi: reg  base2logprop gps_plur_pop_4point incumbency right conservative spain argentina italy brazil canada i.election_year ,vce(cluster country);
eststo aa1;
xi: reg  base2logprop gps_pop_bin incumbency  right conservative  spain argentina italy brazil canada i.election_year  ,vce(cluster country);
eststo aa2;
xi: reg  base2logprop  gpswillpeople gps_peopledecide gps_corrupt gps_strongman incumbency  right conservative  spain argentina italy brazil canada i.election_year ,vce(cluster country);
eststo aa3;
xi: reg  base2logprop right left_populist right_populist incumbency  conservative  spain argentina italy brazil canada i.election_year ,vce(cluster country);
eststo aa4;
xi: reg  base2logprop gps_pop_bin post_populist populist_post_populist  incumbency right conservative spain argentina italy brazil canada i.election_year ,vce(cluster country);
eststo aa5;
xi: reg  base2logprop gps_pop_bin  incumbency populist_incumbent right conservative  spain argentina italy brazil canada i.election_year ,vce(cluster country);
eststo aa6;
estout aa1 aa2 aa3 aa4 aa5 aa6 using crossdiaspora.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 



***Table A84: Ordinary Least Squares Regression on Relative Support for 1st Round Presidential***;
***Candidates among both US and non-US diasporas compared to origin country voters in Bolivia,***;
***Chile, Ecuador, Paraguay, and Peru***;
xi: reg  base2logprop gps_plur_pop_4point incumbency right conservative spain argentina italy brazil canada i.election_year if cross_diaspora==1,vce(cluster country);
eststo ab1;
xi: reg  base2logprop gps_pop_bin incumbency  right conservative  spain argentina italy brazil canada i.election_year if cross_diaspora==1  ,vce(cluster country);
eststo ab2;
xi: reg  base2logprop  gpswillpeople gps_peopledecide gps_corrupt gps_strongman incumbency  right conservative  spain argentina italy brazil canada i.election_year  if cross_diaspora==1,vce(cluster country);
eststo ab3;
xi: reg  base2logprop right left_populist right_populist incumbency  conservative  spain argentina italy brazil canada i.election_year  if cross_diaspora==1,vce(cluster country);
eststo ab4;
xi: reg  base2logprop gps_pop_bin post_populist populist_post_populist  incumbency right conservative spain argentina italy brazil canada i.election_year  if cross_diaspora==1,vce(cluster country);
eststo ab5;
xi: reg  base2logprop gps_pop_bin  incumbency populist_incumbent right conservative  spain argentina italy brazil canada i.election_year  if cross_diaspora==1,vce(cluster country);
eststo ab6;
estout ab1 ab2 ab3 ab4 ab5 ab6 using crossdiaspora2.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

***Table A85: Ordinary Least Squares Regression on Relative Support for 1st Round Presidential***;
***Candidates among non-US diasporas compared to origin country voters in Bolivia, Chile, Ecuador,***;
***Paraguay, and Peru***;
xi: reg  base2logprop gps_plur_pop_4point incumbency right conservative argentina italy brazil canada i.election_year if dest_country!="United States",vce(cluster country);
eststo ac1;
xi: reg  base2logprop gps_pop_bin incumbency  right conservative  argentina italy brazil canada i.election_year if  dest_country!="United States",vce(cluster country);
eststo ac2;
xi: reg  base2logprop  gpswillpeople gps_peopledecide gps_corrupt gps_strongman incumbency  right conservative  argentina italy brazil canada i.election_year  if dest_country!="United States",vce(cluster country);
eststo ac3;
xi: reg  base2logprop right left_populist right_populist incumbency  conservative  argentina italy brazil canada i.election_year  if dest_country!="United States",vce(cluster country);
eststo ac4;
xi: reg  base2logprop gps_pop_bin post_populist populist_post_populist  incumbency right conservative argentina italy brazil canada i.election_year if dest_country!="United States",vce(cluster country);
eststo ac5;
xi: reg  base2logprop gps_pop_bin  incumbency populist_incumbent right conservative argentina italy brazil canada i.election_year  if dest_country!="United States",vce(cluster country);
eststo ac6;
estout ac1 ac2 ac3 ac4 ac5 ac6 using crossdiaspora3.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 





***Table A86: Ordinary Least Squares Regression on Relative Support for 1st Round Presidential***;
***Candidates among diasporas in the United States and non-US diasporas from Chile, Ecuador and***;
***Peru compared to origin country voters***;
xi: reg  base2logprop gps_plur_pop_4point incumbency right conservative i.election_year  argentina brazil spain if sub_national_missing==1,vce(cluster country);
eststo ay1;
xi: reg  base2logprop gps_pop_bin incumbency  right conservative i.election_year  argentina brazil spain if sub_national_missing==1,vce(cluster country);
eststo ay2;
xi: reg  base2logprop  gpswillpeople gps_peopledecide gps_corrupt gps_strongman incumbency  right conservative i.election_year  argentina brazil spain if sub_national_missing==1,vce(cluster country);
eststo ay3;
xi: reg  base2logprop right left_populist right_populist incumbency  conservative i.election_year  argentina brazil spain if sub_national_missing==1 ,vce(cluster country);
eststo ay4;
xi: reg  base2logprop gps_pop_bin post_populist populist_post_populist  incumbency right conservative i.election_year argentina brazil spain if sub_national_missing==1 ,vce(cluster country);
eststo ay5;
xi: reg  base2logprop gps_pop_bin incumbency populist_incumbent right conservative i.election_year argentina brazil spain if sub_national_missing==1 ,vce(cluster country);
eststo ay6;
estout ay1 ay2 ay3 ay4 ay5 ay6 using crossdiaspora5.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 


***Table A87: Ordinary Least Squares Regression on Relative Support for 1st Round Presidential***;
***Candidates among diasporas in the United States and non-US diasporas in Bolivia and Paraguay***;
***compared to origin country voters***;
xi: reg  base2logprop gps_plur_pop_4point incumbency right conservative i.election_year argentina canada italy spain if sub_national_missing!=1,vce(cluster country);
eststo ax1;
xi: reg  base2logprop gps_pop_bin incumbency  right conservative  i.election_year argentina canada italy spain if sub_national_missing!=1,vce(cluster country);
eststo ax2;
xi: reg  base2logprop  gpswillpeople gps_peopledecide gps_corrupt gps_strongman incumbency  right conservative i.election_year argentina canada italy spain if sub_national_missing!=1,vce(cluster country);
eststo ax3;
xi: reg  base2logprop right left_populist right_populist incumbency  conservative i.election_year  argentina canada italy spain if sub_national_missing!=1 ,vce(cluster country);
eststo ax4;
xi: reg  base2logprop gps_pop_bin post_populist populist_post_populist  incumbency right conservative i.election_year argentina canada italy spain if sub_national_missing!=1 ,vce(cluster country);
eststo ax5;
xi: reg  base2logprop gps_pop_bin incumbency populist_incumbent right conservative i.election_year argentina canada italy spain if sub_national_missing!=1 ,vce(cluster country);
eststo ax6;
estout ax1 ax2 ax3 ax4 ax5 ax6 using crossdiaspora4.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2 N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

